home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 026-050 / scopedisk46 / mj-pgs / readme < prev    next >
Text File  |  1995-03-18  |  5KB  |  85 lines

  1. The programs in this group are in AmigaBasic and designed to generate and
  2. plot Mandelbrot and Julia sets. The time-critical iteration routine of 
  3. the generator (MJ.Gen_T) is written in assembly language by Martin F. Combs
  4. with whom I have been in correspondence since early in 1987. An additional
  5. innovation by Martin is that the ML program operates on long integers which
  6. are derived by multiplying input parameters by 2^28. As a result, the pro-
  7. gram is extremely fast (about 3 times as fast as the usual Mandelbrot pro-
  8. grams written in C, available as PD or Shareware). Its precision is limit-
  9. ed to that of singe-precision floating point, sufficient to calculate all
  10. of the "Maps" in H.-O. Peitgen and P.H. Richter's book "The Beauty of Frac-
  11. tals" in 640x400 screen format. The only exception is Map 49 for which a
  12. slower, double-precision generator by M. Combs (multiplying by 2^60) was
  13. required. Contributions to the Basic code were by Martin, Zoltan Szepesi
  14. and myself.
  15.  
  16. An important feature of our system is that the geneator writes a sequential
  17. file which consists of the iteration counts associated with each pixel of
  18. the area to be plotted. While this may take several hours, it needs to be
  19. done only once. The file can then be read from disk in about 10-20 minutes
  20. and plotted in a variety of ways provided by a program (MJ.plot_T) which
  21. allows the use of different palettes and "breakpoints" (counts where the
  22. color should change). The choice of the lowest and highest counts to be
  23. used can modify the appearance of the plot in important ways. The generator
  24. itself does have a more primitive plotting capability whose only purpose is
  25. to estimate these parameters and to center the location of the area with
  26. with sufficient precision.
  27.  
  28. In addition to the file of iteration counts, the generator also produces a
  29. file of the frequency of occurrance of each count. We call this the stat
  30. file. It is useful as input to utility programs which facilitate the divi-
  31. sion of counts so that each color occurs in areas of appropriate size. The
  32. program M-graph_T plots a bargraph of the stat file and the program
  33. Divide_T produces what amounts to a division of this bargraph into equal-
  34. area sections. Another technique for dividing the range of counts is by a
  35. geometric series produced by "Breakpoints" which is a subroutine in the
  36. plotting portion of the generator. The separate "Brkpts_T" program is
  37. included.
  38.  
  39. The Divide.Combs program uses the number of pixels/screen rather than two
  40. arrays as my divide program does. It is much shorter and faster. Although
  41. it has no knowledge of the iteration limit, it nevertheless recognizes the
  42. areas in which it has been reached, i.e. which belong to the set.
  43.  
  44. The third file produced by the generator is the "inform" file. It is a re-
  45. cent addition and simply a summary of all of the parameters of the region
  46. to be investigated. Plot and utility programs read it and use what they
  47. need. 
  48.  
  49. Closed Julia sets are often shown with a structured interior. We had no
  50. idea what was used to differentiate the interior sections, but it occured
  51. to me that where the count has reached the iteration limit, the size^2 is
  52. variable and could therefore be used to provide some interior structure. 
  53. These values can range from 1E-5 (rarely) to 4 (theoretically, but in prac-
  54. tice much less than 4). Martin Combs has ingeniously modified the assembly
  55. routine so that if the iteration limit is reached, the corresponding value
  56. of size is multiplied by 'jsizelimit'/4 and this product is added to the
  57. iteration limit before being returned to the Basic program. For purposes
  58. of working with long integers derived from inputs multiplied by 2^28, this
  59. value should be entered as a power of 2. Added to a practical iteration
  60. limit of 1000, the highest number which the .stat file data can be dimen-
  61. sioned would be 5096 which should suffice in almost all cases. I know of
  62. no way in which one can anticipate the minimum factor required to scale
  63. the lowest existing values of size to a useable (integer) value, i.e. 1,
  64. other than applying a Basic program which returns the actual sizes during
  65. the process of generating the .count file. I have done this only rarely.
  66.  
  67. A very important utility is a means to write a file of breakpoints and
  68. palettes called SelectColors, written by Martin Combs (included here as
  69. Sel.Cols). Finally, an ASCII file of the assembly routine used in MJ.Gen_T
  70. is included as J-size.asc. For those who (by now) wonder about the meaning
  71. of _T: it means text file (I prefer to save my Amigabasic programs in ASCII
  72. format). I also use _A (binary AmigaBasic), _D (datafile), _B (binary), _E
  73. (executable), _AB (ABasiC), _P (picture). A new dir or list routine is
  74. needed so that I'll no longer try to load an IFF picture into AmigaBasic!!
  75.  
  76. I normally use GRABBiT to save pictures, but this requires external memory
  77. with mode 4 screens of reasonable size. Martin has excerpted 'sub_saveILBM'
  78. from the saveILBM program by Carolyn Scheppner (on the Extras disk). It may
  79. may be appended to MJ.plot_T and is included in this package.
  80.  
  81. Detailed instructions on using the programs are provided in a separate
  82. Instruct file.
  83.  
  84.                                                           Anselm Wachtel
  85.